3.287 \(\int \cos (e+f x) (b \csc (e+f x))^n \, dx\)

Optimal. Leaf size=24 \[ \frac{b (b \csc (e+f x))^{n-1}}{f (1-n)} \]

[Out]

(b*(b*Csc[e + f*x])^(-1 + n))/(f*(1 - n))

________________________________________________________________________________________

Rubi [A]  time = 0.0335722, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {2621, 30} \[ \frac{b (b \csc (e+f x))^{n-1}}{f (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]*(b*Csc[e + f*x])^n,x]

[Out]

(b*(b*Csc[e + f*x])^(-1 + n))/(f*(1 - n))

Rule 2621

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \cos (e+f x) (b \csc (e+f x))^n \, dx &=-\frac{b \operatorname{Subst}\left (\int x^{-2+n} \, dx,x,b \csc (e+f x)\right )}{f}\\ &=\frac{b (b \csc (e+f x))^{-1+n}}{f (1-n)}\\ \end{align*}

Mathematica [A]  time = 0.0249491, size = 23, normalized size = 0.96 \[ -\frac{b (b \csc (e+f x))^{n-1}}{f (n-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]*(b*Csc[e + f*x])^n,x]

[Out]

-((b*(b*Csc[e + f*x])^(-1 + n))/(f*(-1 + n)))

________________________________________________________________________________________

Maple [B]  time = 0.07, size = 66, normalized size = 2.8 \begin{align*} -2\,{\frac{\tan \left ( 1/2\,fx+e/2 \right ) }{f \left ( -1+n \right ) \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) }{{\rm e}^{n\ln \left ( 1/2\,{\frac{b \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) }{\tan \left ( 1/2\,fx+e/2 \right ) }} \right ) }}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)*(b*csc(f*x+e))^n,x)

[Out]

-2/f/(-1+n)*tan(1/2*f*x+1/2*e)*exp(n*ln(1/2*b*(1+tan(1/2*f*x+1/2*e)^2)/tan(1/2*f*x+1/2*e)))/(1+tan(1/2*f*x+1/2
*e)^2)

________________________________________________________________________________________

Maxima [A]  time = 1.14941, size = 39, normalized size = 1.62 \begin{align*} -\frac{b^{n} \sin \left (f x + e\right )^{-n} \sin \left (f x + e\right )}{f{\left (n - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="maxima")

[Out]

-b^n*sin(f*x + e)^(-n)*sin(f*x + e)/(f*(n - 1))

________________________________________________________________________________________

Fricas [A]  time = 1.69949, size = 59, normalized size = 2.46 \begin{align*} -\frac{\left (\frac{b}{\sin \left (f x + e\right )}\right )^{n} \sin \left (f x + e\right )}{f n - f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="fricas")

[Out]

-(b/sin(f*x + e))^n*sin(f*x + e)/(f*n - f)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \csc{\left (e + f x \right )}\right )^{n} \cos{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))**n,x)

[Out]

Integral((b*csc(e + f*x))**n*cos(e + f*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \csc \left (f x + e\right )\right )^{n} \cos \left (f x + e\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*csc(f*x + e))^n*cos(f*x + e), x)